1. Technical Field
The present invention relates to a technology of managing the number of socket descriptors (referred to as “sockets” in this specification) allocated to each of one or more network applications operating in a computer system.
2. Related Art
A socket interface is used for programming a general network application, and the application uses a socket descriptor (or socket) generated by the socket interface to identify a communication destination for communication.
In a computer system which has a relatively large amount of built-in memory, such as a personal computer, the network application can use sockets without considering the upper-limit number of sockets. In contrast, a computer system built in an apparatus such as a printer has a small amount of built-in memory, and only a small number of sockets corresponding to the amount of the memory can be used. Therefore, it is usual that the number of sockets which can be used are allocated in advance to each network application, and a program is created with the allocated sockets.
In the latter case (the computer system built in an apparatus such as a printer), since a certain number of sockets need to be allocated even to rarely used applications, the number of sockets to be allocated to an application for a main function (for example, a print function in the printer) which is most frequently used in the apparatus is reduced, thus reducing the number of client connections which can be established at the same time. A simple solution to such a problem of reduction in the network performance of a product is to increase the amount of built-in memory, which naturally causes an increase in cost.
As for socket allocation, JP-A-2000-148426 discloses a technology in which sockets to be used by an application that monitors a printer are reserved in advance in order to avoid a situation where communication cannot be performed because of socket shortage, and the reserved sockets are used in response to a request of the application. With this technology, the application can be always operated normally. However, since sockets that are not being used are also always reserved, the socket resources are not efficiently used in the entire product.